#pragma once

class BinaryMemory
{
public:
	BinaryMemory();
	~BinaryMemory();

	virtual void SetMemorySize( unsigned int memorySize );

	unsigned int GetMemorySize() const { return m_MemorySize; };

	void SetMemory(void* memory, long FileSize);

	void * GetMemory( unsigned int offset = 0 )
	{
		assert( offset < m_MemorySize );
		return reinterpret_cast<BYTE*>(m_Memory) + offset;
	}

	const void * GetMemory( unsigned int offset = 0 ) const
	{
		assert( offset < m_MemorySize );
		return reinterpret_cast<BYTE*>(m_Memory) + offset;
	}

private:
	void * m_Memory;
	unsigned int m_MemorySize;

};